<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>FCMS后台管理系统</title>
    <meta name="description" content="overview &amp; stats" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/bootstrap.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/font-awesome/4.5.0/css/font-awesome.min.css" />
    <!-- ace styles -->
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
    <!--[if lte IE 9]>
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/ace-ie.min.css" />
    <![endif]-->
    <!-- inline styles related to this page -->
    <!-- ace settings handler -->
    <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
    <!--[if lte IE 8]>
    <script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/html5shiv.min.js"></script>
    <script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="no-skin" onload="iFrameHeight()">
<div id="navbar" class="navbar navbar-default ace-save-state">
    <?php include_once 'navbar_container.php'?>
    <!-- /.navbar-container -->
</div>

<div class="main-container ace-save-state" id="main-container">
    <?php include_once 'sidebar_left.php'?>
    <!-- /.sidebar_left -->
    <div class="main-content">
        <div class="main-content-inner J_mainContent" id="content-main">
            <iframe id="mainFrame" class="J_iframe" name="iframe0" width="100%" height="100%" src="<?=$this->createUrl('default/main')?>" frameborder="0" data-id="<?=$this->createUrl('default/main')?>" seamless></iframe>
        </div>
    </div><!-- /.main-content -->
    <div class="footer">
        <div class="footer-inner">
            <div class="footer-content">
                <span class="bigger-120">
                    <span class="blue bolder"><a href="//www.found5.com" target="_blank">FCMS</a></span>
                    Application &copy; 2013-<?=date('Y')?>
                </span>
                &nbsp; &nbsp;
                <span class="action-buttons">
                    <a href="//www.found5.com" target="_blank"><i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i></a>
                    <a href="//www.found5.com" target="_blank"><i class="ace-icon fa fa-facebook-square text-primary bigger-150"></i></a>
                    <a href="//www.found5.com" target="_blank"><i class="ace-icon fa fa-rss-square orange bigger-150"></i></a>
                </span>
            </div>
        </div>
    </div><!-- /.footer -->
    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>
</div><!-- /.main-container -->
<!-- basic scripts -->
<!--[if !IE]> --><script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/jquery-2.1.4.min.js"></script><!-- <![endif]-->
<!--[if IE]><script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/jquery-1.11.3.min.js"></script><![endif]-->
<script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/bootstrap.min.js"></script>
<!-- ace scripts -->
<script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/ace-elements.min.js"></script>
<script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/ace.min.js"></script>
<!-- iframe contabs -->
<script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/contabs.min.js"></script>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    function reloadIframe() {
        var current_iframe = $("iframe:visible");
        current_iframe[0].contentWindow.location.reload();
        return false;
    }
    if (window.top !== window.self) {
        window.top.location = window.location;
    }

    //设置iframe高度
    function iFrameHeight() {
        //iframe对象
        var ifm = $("#content-main")
        //网页可见区域高
        var _clientHeight = document.documentElement.clientHeight
        ifm.css('height', _clientHeight - 120)
        console.log(_clientHeight);
    }


    jQuery(function($) {
        //$("#content-main").setHeight(document.body.clientHeight);
        // AdForm Select input type
        var defaultType = $("select#adForm-input_type :selected").val();
        $(".form-group.field-adForm-ad").not(".input_"+defaultType).hide().find("input[name=AdForm\\[ad\\]], textarea[name=AdForm\\[ad\\]]").attr('disabled', true);
        $("select#adForm-input_type").change(function () {
            var type = parseInt( $(this).val() );
            $(".form-group.field-adForm-ad").hide().find("input[name=AdForm\\[ad\\]], textarea[name=AdForm\\[ad\\]]").attr('disabled', true);
            $(".form-group.field-adForm-ad.input_"+type).show().attr('name', 'AdForm[value]').find("input[name=AdForm\\[ad\\]], textarea[name=AdForm\\[ad\\]]").attr('disabled', false);
        });

    });
</script>
</body>
</html>